<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AlterTableStaffPeriodFeesAddHotWaterFee extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('staff_period_fees', function (Blueprint $table) {
            //
            if(!Schema::hasColumn('staff_period_fees','hot_water_fee')){
                $table->decimal('hot_water_fee')->nullable();
            }
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('staff_period_fees', function (Blueprint $table) {
            //
$table->dropColumn('hot_water_fee');        });
    }
}
